#include <bits/stdc++.h>
#ifndef DEBUG
#define debug
#endif
using namespace std;
using i64 = int64_t;

int main() {
  cin.tie(0)->sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i ++) {
    cin >> a[i];
  }
  vector<int> diff(n + 2);
  for (int i = n; i >= 1; i --) {
    diff[i] = a[i] - a[i - 1];
  }
  for (int i = 1; i <= n; i ++) {
    cout << diff[i] << " ";
  }
  cout << endl;
}